You must fill in a sound double buffer header record if you wish to manage your own double buffers. The dbhBufferPtr field of the sound double buffer header record references two sound double buffer records, which you must also fill out. The SndDoubleBufferHeader data type defines a sound double buffer header.
TYPE SndDoubleBuffer =
PACKED RECORD
dbNumFrames: LongInt; {number of frames in buffer}
dbFlags: LongInt; {buffer status flags}
dbUserInfo: ARRAY[0..1] OF LongInt; {for application's use}
dbSoundData: PACKED ARRAY[0..0] OF Byte; {array of data}
END;
The buffer status flags field for each of the two buffers can contain either of these values that your doubleback procedure must set when appropriate:
CONST
dbBufferReady = $00000001;
dbLastBuffer = $00000004;
All other bits in the dbFlags field are reserved by Apple; your application should not modify them.
| Previous | Chapter contents | Chapter top | Section top | Next |